package com.pilates

import grails.test.*

class TurmaTests extends GrailsUnitTestCase {
    protected void setUp() {
        super.setUp()
    }

    protected void tearDown() {
        super.tearDown()
    }

    void testSomething() {
		Long turmaId = 5;
		
		List<Turma> lTurma = Turma.findAll("from Turma tur " +
				" inner join fetch tur.aulas aul " +
				" where " +
				" tur.id = :turId ",[turId : turmaId]);
		
		for (Turma turma : lTurma) {
			System.out.println(turma.getAulas());
		}
    }
}
